package org.jxht.service.impl;

import org.jxht.dao.AdminDao;
import org.jxht.dto.AdminDto;
import org.jxht.service.AdminServie;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by huang on 2017/3/15 0015.
 */
@Service
public class AdminServiceImpl implements AdminServie {

    @Resource
    AdminDao adminDao;

    public void insertAdminService(AdminDto dto) {
        adminDao.insertAdminDao(dto);
    }

    public List queryAdminService(AdminDto dto) {
        return adminDao.queryAdminDao(dto);
    }

    public AdminDto queryAdminServiceSingle(AdminDto dto) {
        return (AdminDto) adminDao.queryAdminDao(dto).get(0);
    }

    public void updataAdminService(AdminDto dto) {
        adminDao.updataAdminDao(dto);
    }

    public void deleteAdminService(AdminDto dto) {
        adminDao.deleteAdminDao(dto);
    }
}
